// pages/bind/bind.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    person: '',
    carnumber: '',
    chejia: '',
    fadongji: '',
    carkind: '',
    zuowei: '',
    nianjian: ''
  },
  personInput: function (e) {
    this.setData({
      person: e.detail.value
    })
  },

  carnumberInput: function (e) {
    this.setData({
      carnumber: e.detail.value
    })
  },

  chejiaInput: function (e) {
    this.setData({
      chejia: e.detail.value
    })
  },

  fadongjiInput: function (e) {
    this.setData({
      fadongji: e.detail.value
    })
  },

  carkindInput: function (e) {
    this.setData({
      carkind: e.detail.value
    })
  },

  zuoweiInput: function (e) {
    this.setData({
      zuowei: e.detail.value
    })
  },

  nianjianInput: function (e) {
    this.setData({
      nianjian: e.detail.value
    })
  },

  tosuccess: function () {
   var test1 = 'a2b3'

    //   wx.navigateTo({
    //     url: '../test/test?goodsId' + test1,
    //   })
    if (this.data.person == '' || this.data.carnumber == '' || this.data.chejia == '' || this.data.fadongji == '' || this.data.carkind == '' || this.data.zuowei == '' || this.data.nianjian == '') {
      wx.showModal({
        title: '提示',
        content: '请输入正确的信息',
        showCancel: false
      })
      console.log("sss")
    } else {
      wx.navigateTo({
        url: '../../test/test?person' + test1
      })
      console.log("ddd")
    }
  },


  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})